###################################################
# Copyright(C) 2022 by Light. All right reserved. #
#  Find_Maximum_Common_Factor (Release_1.0.4.12)  #
###################################################
print("寻找最大公因数 1.0.4.12")
#Vars.
numbers_in = []
factors = []
factors_common = []
def max_common_factor_find(numbers):
    #Get_Factors.
    count_0 = 0
    for number in numbers:
        thenumber = number
        thenumber_loop = thenumber + 1
        for factors_find in range(1,thenumber_loop):
            thenumber_calc = thenumber % factors_find
            if thenumber_calc == 0:
                factors.append(factors_find)
        count_0 += 1
    #Get_Max_Common_Factor.
    factors_same_qty = 0
    factors_calc_0 = sorted(factors)
    factors_calc_1 = factors_calc_0
    for factors_each_0 in factors_calc_0:
        count_1 = 0
        for factors_each_1 in factors_calc_1:
            if factors_each_0 == factors_each_1:
                count_1 += 1
                if count_1 == count_0:
                    factors_common.append(factors_each_1)
    max_common_factor = factors_common[-1]
    print(numbers,"的最大公因数是:",max_common_factor)
#Main.
#Input.
usernumbers_qty = int(input("请输入你有几个数:"))
usernumbers_qty = usernumbers_qty + 1
for input_loop in range(1,usernumbers_qty):
    print("你的数", input_loop, ":",end = "")
    usernumbers = int(input())
    numbers_in.append(usernumbers)
max_common_factor_find(numbers_in)
end = input("按任意键以继续...\n")
